<?php

if (!isset($_SESSION['logged']) || $_SESSION['level'] != "admin")
    print "<script language='javascript'>
        window.location.href='./?url=404';
        </script>";
else {
    $idtype = $_POST['idtype'];
    $title = $_POST['title'];

    $sql = "UPDATE `type` SET `title` = '$title' WHERE `id` = '$idtype';";
    $result = mysql_query($sql, $link);
    
    print "<script language='javascript'>
        window.location.href='./';
        </script>";
}
?>
